package com.xjtu.platform.reader.utils;

import com.xjtu.platform.reader.entity.BookScore;

import java.util.List;

public class BookUtils {
    public static String calBookAllScore(List<BookScore> scoreList) {
        double allScore = 0;
        for(BookScore item : scoreList){
            allScore += Double.parseDouble(item.getScore());
        }
        return Double.toString(allScore/scoreList.size());
    }
}
